function a() {
    return new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve(1)
      }, 1000)
    })
  }
  
  function b() {
    return new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve(2)
      }, 1500)
    })
  }
  
  function c() {
    console.log('c');
  }
  
  async function foo() {
    const res = await Promise.all([a(), b()])   //等all里面的数组里的所有promise都执行完才执行下面的代码
    console.log(res);
  }
  
  foo()
  
  
  